package com.wjx.reservation_service.service;

import com.wjx.reservation_service.model.Appointment;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface IAppointmentService {
    //添加预约
    public int addAppointment(Appointment appointment);
    //根据用户id查询预约
    public List<Appointment> queryAppointmentByUserId(int userId);
    //查询所有预约
    public List<Appointment> queryAllAppointment();
    //根据id查询预约
    public Appointment queryAppointmentById(int id);
    //根据id更新预约
    public int updateAppointmentById(Appointment appointment);
    //根据id删除预约
    public int deleteAppointmentById(int id);
    //根据关键词模糊查询
    public List<Appointment> queryLikeAppointment(String keyword);
    //根据服务id查询预约
    public List<Appointment> queryAppointmentByServiceId(int serviceId);
    //根据服务id删除预约
    public int deleteAppointmentByServiceId(int serviceId);
    //根据用户id删除预约
    public int deleteAppointmentByUserId(int userId);
}
